﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        private object _user;

        public Form1()
        {
            InitializeComponent();
        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
           var uName = "admin";

           var pWord = "123456";

            var uid = userName.Text;

            var pwd = passWord.Text;

            if(uName==uid && pWord == pwd)
            {
                MessageBox.Show("登录成功", "恭喜",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
            }
            else
            {
                MessageBox.Show("登录失败","很遗憾",MessageBoxButtons.YesNo,MessageBoxIcon.Information);
               
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {

        }
        public static Dictionary<string, string> user = new Dictionary<string, string>();

        private void Form1_Load(object sender, EventArgs e)
        {
            user.Add("1234", "4567");
        }

        private void userName_MouseUp(object sender, MouseEventArgs e)
        {
            Register register = new Register();
            register.Show();

        }
    }
}
